/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interface;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;

/**
 *
 * @author Laurent
 */
public class curseurSpecial extends JComponent {

    int posX, posY;
    

    public curseurSpecial() {

        setLocation(0, 0);
        this.setSize(50, 50);
        
    }

    
    @Override
    public void paintComponent(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;

        g.setColor(Color.red);
        g2d.setStroke(new BasicStroke(2));
        g2d.drawLine(25, 25, 10, 45);
        g2d.drawLine(25, 25, 40, 45);
    }
    
    public void bouger(double newX, double newY) {
        posX = (int) newX;
        posY = (int) newY;
        setLocation(posX-20,posY);
        
    }
}
